using System; 
using System.IO;
using Doc.Xroad.Eu;
using Doc.Xroad.Eu.Headers;
using Doc.Xroad.Eu.Messages;
using Xtee.Core.Adapter.Service;
using Xtee.Core.Envelope;
using Xtee.XteeAdapter.Doc;
using Xtee.Core;
using Xtee.Core.Envelope.Header;

namespace Server_HandlesAttachmentInMemory.Services
{
    public class GetDocumentService : GetDocumentServiceHandler
    {
        public GetDocumentResponse ProcessRequest(GetDocumentRequest input, GetDocumentInputHeader header)
        {
            var bytes = AddDocumentService.PictureDataBase[input.Id];
            return new GetDocumentResponse(new Document(input.Id, MultipartFile.Create(bytes)));
        }
    }

}
